﻿using System;
using System.Collections.Generic;
using System.Text;
using X.DataFactory;
using X.Entity;

namespace X.Bll
{
    public sealed class Params
    {
        private static readonly IParams dal = DataAccess.CreateParams();

        public static Entity.SiteInfo GetSiteInfo()
        {
            return dal.GetSiteInfo();
        }

        public static bool UpdataSiteInfo(Entity.SiteInfo siteInfo)
        {
            return dal.UpdataSiteInfo(siteInfo);
        }
    }

    public sealed class Msn
    {
        private static readonly IMsn dal = DataAccess.CreateMsn();

        public static MsnInfo GetMsnInfo(int id) { return dal.GetMsnInfo(id); }
        public static IList<MsnInfo> GetAvaList() { return dal.GetAvaList(); }
        public static IList<MsnInfo> GetAllList() { return dal.GetAllList(); }
        public static bool Update(MsnInfo msnInfo) { return dal.Update(msnInfo); }
        public static bool Create(MsnInfo msnInfo) { return dal.Create(msnInfo); }
        public static bool Delete(int id) { return dal.Delete(id); }
    }

    public sealed class Ad
    {
        private static readonly IAd dal = DataAccess.CreateAd();

        public static bool Create(AdInfo adInfo) { return dal.Create(adInfo); }
        public static bool Update(AdInfo adInfo) { return dal.Update(adInfo); }
        public static bool Delete(int id) { return dal.Delete(id); }
        public static IList<AdInfo> GetAllList() { return dal.GetAllList(); }
        public static IList<AdInfo> GetList(int topCount) { return dal.GetList(topCount); }
        public static AdInfo GetAdInfo(int id) { return dal.GetAdInfo(id); }
    }
}
